package com.ccb.jyzx.expand.tiantouonline.view.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author XIEFEI
 * @date 2019-04-20 17:30
 * @Description 分页响应
 **/
@ApiModel(description= "分页查询响应结果")
public class PageResponseReult<T> {
    @ApiModelProperty(value = "状态码")
    private int code;
    @ApiModelProperty(value = "状态信息")
    private String message;
    @ApiModelProperty(value = "响应时间戳")
    private Long timestamp=System.currentTimeMillis();
    @ApiModelProperty(value = "分页数据结果")
    private PageResult<T>  result;

    public PageResponseReult(PageResult<T> result) {
        this.result = result;
    }

    public PageResponseReult(int code, String message, PageResult<T> result) {
        this.code = code;
        this.message = message;
        this.result = result;
    }

    public PageResponseReult() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public PageResult<T> getResult() {
        return result;
    }

    public void setResult(PageResult<T> result) {
        this.result = result;
    }
}
